<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<style type="text/css">
span.blue {
	font-weight: bold
}

span.green {
	font-weight: bold
}

span.redd {
	font-weight: bold;
	font-family: monospace;
	font-size: 12pt
}</style>

<SCRIPT type="text/javascript">
function GraphAction(){	
	var type = $('#graph_graphType').val();	
    if(type == '2'){
	   var mn = $('#graph_selectMonth option:selected').val();
	   var yr = $('#graph_selectYear  option:selected').val();	   
	   if(mn == '' || yr == ''){		   
		   return;		  
	   }
	   document.graphForm.action ="graph?method:createGraph&graphType=2"
	}else if(type == '3'){
	   document.graphForm.action ="graph?method:createGraph&graphType=3";
	}			
	document.graphForm.submit();
}
</SCRIPT>
<body bgcolor="#aaaaFF">
<s:form name="graphForm" method="post" theme="simple">
	<s:hidden name="graphType" />
	<s:hidden name="graphOptions" />
	<div align="center">
	<s:if test="%{graphOptions == \"1\"}"> 
		<fieldset><legend><span class="green">Graph Options:</span></legend> 
			<s:if test="%{graphType == \"2\"}">
				<s:label value="Select Month"  cssStyle="font-weight:bold;font-size : 11pt;"/> 
				<s:select name="selectMonth" list="monthsList" cssStyle="font-size : 11pt"/>
			</s:if>		
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	
			<s:label value="Select Year"  cssStyle="font-weight:bold;font-size : 11pt;"/> 
			<s:textfield key="selectYear" cssStyle="font-size : 11pt;height:20;width:100"/>
			<s:submit value="Draw Graph" cssStyle="font-weight:bold;font-size : 10pt;height:20" onclick="javascript:GraphAction()"/>			
		</fieldset>
	</s:if>
	</div>
	<div>
	<%
		response.setContentType("image/png");
			String filename = (String) session.getAttribute("filename");
			String maptag = (String) session.getAttribute("maptag");
	%> <%=maptag%> <img src="<s:property value="fileName"/>" border=0 usemap="#<%= filename %>"></div>
</s:form>
</body>
</html>
